<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
<title></title> <jsp:include page="../common/head.jsp"></jsp:include>


<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}

@media ( max-width : 980px) {
	/* Enable use of floated navbar text */
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
</head>
<body>
<div><br /></div>
	<div class="definewidth">
		<shiro:hasPermission name="sys:role:add"> <a class="btn btn-success"
			href="${path}/role/add">新增角色</a> </shiro:hasPermission>
	</div>
	<table class="table table-bordered table-hover definewidth m10">
		<thead>
			<tr>
				<th>角色名</th>
				<th>编码</th>
				<th>描述</th>
				<th>排序</th>
				<th>是否启用</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${list}" var="u">
			<tr class="">
				<td>${u.name}</td>
				<td>${u.roleCode}</td>
				<td>${u.description}</td>
				<td class="center">${u.sort}</td>
				<td>
					<c:if test="${u.disabled == 0 }">启用</c:if>
					<c:if test="${u.disabled != 0 }">禁用</c:if>
				<td>
				<shiro:hasPermission name="sys:role:update">
				<a class="edit" href="${path}/role/add?id=${u.id}">修改</a> 
				</shiro:hasPermission>
				<shiro:hasPermission name="sys:role:permView">
				&nbsp;&nbsp;<a class="edit" href="${path}/role/editPerm?id=${u.id}">修改权限</a>
				</shiro:hasPermission>
				</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<jsp:include page="../common/page.jsp"></jsp:include> <jsp:include page="../common/foot.jsp"></jsp:include>
</body>
</html>
